﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using MyFinanceManager.Objects;

namespace MyFinanceManager.PC
{
    /// <summary>
    /// Interaction logic for ucAddNewTransfer.xaml
    /// </summary>
    public partial class ucAddNewTransfer : UserControl
    {
        public ucAddNewTransfer()
        {
            InitializeComponent();

            foreach (var item in Database.NamesOfAccounts)
            {
                this.AccountFrom.Items.Add(item);
                this.AccountTo.Items.Add(item);
            }
        }

        public TransferRecord Value
        {
            get
            {
                ObjectDataProvider odp = this.FindResource("TransferRecordDS") as ObjectDataProvider;
                TransferRecord pr = odp.Data as TransferRecord;
                return pr;
            }
        }
    }
}
